/*************
*覆盖elementUI样式
**************/
.el-time-panel {
    box-sizing: initial;
}

.el-table__expanded-cell { //修改折叠表格内间距
    padding: 8px !important;
    // background: #eee;
    // &:hover{
    //     background: #eee !important;
    // }
}

.el-step__icon { //解决步骤数字不剧中问题
    line-height: 24px !important;
}

.el-step__line.is-horizontal { //解决步骤横线断开问题
    top: 13px !important;
    height: 2px !important;
    left: 28px !important;
    right: 0 !important;
}

.topAccordion .el-tabs__header { //tag 样式覆盖
    border-bottom: 1px dashed #ddd !important;
    margin: 0;
}

//表格样式
table {
    .el-form-item__content {
        line-height: inherit;
    }
    
    .el-radio__label {
        font-size: 12px;
    }
}

.el-table {
    .el-table__header {
        tr {
            th {
                background: $content-table-header-bg;
                
                > .cell {
                    color: #656565;
                    font-size: 13px;
                }
            }
        }
    }
    
    .el-table__body-wrapper {
        height: 100%;
    }
    
    //elementUI table 修改选中后高亮
    .highlignt-tr > td {
        background-color: rgba(orange, .1) !important;
    }
    
    //elementUI table 添加编辑后高亮样式
    .edited-tr {
        td:first-child {
            &::after {
                position: absolute;
                top: 0;
                left: 0;
                content: '';
                width: 0;
                height: 100%;
                border-left: 2px solid #ff9000;
            }
        }
    }
}

.el-table--mini td, .el-table--mini th {
    // padding:11px 0;
    height: 47px;
}

// 树表折叠箭头样式
.el-table__expand-column {
    .el-icon {
        font-weight: bolder;
        color: $content-primary;
    }
}

//超小按钮样式覆盖
.el-button--mini, .el-button--mini.is-round {
    padding: 5px 10px !important;
    font-size: 11px !important;
}

//解决树形组件最后一级箭头在部分使用了mactype字体后不能完全透明
.el-tree-node__expand-icon.is-leaf {
    visibility: hidden;
}

// 表单验证 错误提示改为hover触发
.el-form-item {
    &.is-error {
        // 单选和多选组件标红
        .el-radio__inner, .el-checkbox__inner {
            border-color: #f56c6c;
        }
    }
    
    .el-form-item__error {
        transition: .3s;
        opacity: 0;
        transform: translate3d(0, -20px, 0) scale3d(1, 0, 1);
        z-index: 2;
        background-color: $content-bg;
        box-shadow: 0 3px 3px rgba(#000, .2);
        margin-top: 8px;
        padding: 4px 7px;
        border-radius: 3px;
        border: 1px $content-danger solid;
        
        &:before {
            border: 1px $content-danger solid !important;
            border-width: 1px 0 0 1px !important;
            background-color: $content-bg;
            top: -1px;
            left: 15px;
            content: '';
            z-index: 2;
            width: 6px;
            height: 6px;
            position: absolute;
            transform: translateX(-50%) translateY(-50%) rotate(45deg);
        }
    }
    
    &:hover {
        .el-form-item__error {
            opacity: 1;
            transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
        }
    }
}

.el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
    margin-bottom: 0;
}

//element 分页
.el-pagination__jump {
    font-size: 12px !important;
    margin-left: 10px !important;
}

.el-pagination__jump .el-input__inner {
    height: 21px !important;
    width: 80% !important;
    font-size: 12px !important;
}

.el-pagination__sizes {
    .el-input.el-input--suffix {
        width: 85px !important;
    }
    
    .el-input__inner {
        line-height: 22px !important;
        height: 22px !important;
        font-size: 12px !important;
    }
}

// element popover
.el-popover { //阴影
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .3);
}

.el-popper[x-placement^=bottom] .popper__arrow { //箭头
    border-bottom-color: #ddd;
}

//图标往右飘
.el-input__prefix {
    right: 5px;
    left: initial;
}

// .el-input__suffix-inner{
//     background:#fff;
// }
.el-input--prefix .el-input__inner {
    padding-left: 15px;
}

//时间日期充满
.el-date-editor.el-input, .el-date-editor.el-input__inner {
    width: 100%;
}

.date-time-picker-range {
    .date-time-picker-start {
        width: calc(50% - 10px);
    }
    
    .date-time-picker-end {
        width: calc(50% - 10px);
    }
}

//地区选择充满
.el-cascader {
    width: 100%;
}

//浮动框滚动条
.el-popper ::-webkit-scrollbar {
    width: 3px;
    height: 4px;
}

//表单样式
tr .el-form-item {
    margin-bottom: 0;
}

.el-form-item__label {
    font-size: 12px;
}

//抵消地区选择组件初始化被验证成功
.offset-success .el-cascader .el-input__inner {
    border-color: #dcdfe6
}

//红色背景进度条
.mod-progress-red-bg {
    .el-progress-bar__outer {
        background: rgba($content-danger, .7) !important;
    }
}

//表格footer样式
.el-table {
    .el-table__footer-wrapper {
        table {
            tr {
                .footer-align-left {
                    text-align: left;
                }
                
                .footer-align-center {
                    text-align: center;
                }
                
                .footer-align-right {
                    text-align: right;
                }
                
                td {
                    color: $content-danger;
                }
            }
        }
    }
}

//.el-collapse
.el-collapse {
    border-top: none;
    
    .el-collapse-item:last-child {
        .el-collapse-item__header {
            border-bottom: none;
        }
        
        .el-collapse-item__wrap {
            border-bottom: none;
        }
    }
}

//el-input字体大小
.el-input__inner {
    font-size: 12px
}

//折叠子表表头样式
.el-table__expanded-cell {
    .el-table__header-wrapper {
        table {
            border-top: 2px solid rgba($content-heightLight, .5)
        }
    }
}

.el-table--mini {
    .el-table__expanded-cell {
        th {
            height: 45px;
        }
    }
}

//去掉card的padding
.el-card.no-padding {
    .el-card__body {
        padding: 0 !important;
    }
}

//去掉el-card hidden
.el-card {
    overflow: inherit;
}

//下拉树样式修改
.dropdown-tree-node-label {
    flex: 1 !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    padding-right: 8px;
    
    &.act {
        .checkmark.icon {
            visibility: visible;
            color: $content-heightLight;
        }
    }
    
    .checkmark.icon {
        visibility: hidden;
    }
}

.el-menu--vertical.sidebar-popup {
    height: 600px;
    overflow: auto;
    
    .el-menu-item-group__title {
        padding: 0;
    }
    
    .el-menu-item, .el-submenu__title {
        height: 40px;
        line-height: 40px;
        
        /*color:rgba(#fff, .5);
        &:hover{
            background:#000;
        }
        &:focus{
            background:transparent;
        }*/
    }
}

/*兼容ie10*/
.el-input__prefix {
    left: inherit;
    right: 0 !important;
}

/*解决关闭图标和底部图标重叠看不清问题*/
.el-icon-circle-close:before {
    background: #fff;
    position: relative;
    right: -5px;
}

// 去掉loading的蒙层透明度
.el-loading-mask {
    transition: none;
}

// 他们喜欢”确定“在前面 -__-!
.el-message-box__btns {
    display: flex;
    flex-flow: row-reverse nowrap;
    place-content: center flex-start;
    align-items: flex-start;
    
    > button {
        margin-left: 10px;
    }
}

//el-table tr:hover颜色统一
.el-table__row.hover-row {
    td {
        background-color: #F5F7FA !important;
    }
}

// el-form在el-table中时 将最后一个验证向上飘出
.el-form-item.is-error.up {
    .el-form-item__error {
        top: -35px;
        
        &::before {
            transform: translateX(-50%) translateY(-50%) rotate(225deg);
            top: 21px;
        }
    }
}

// 解决 el-scrollbar 底部出现原生滚动条问题
.el-scrollbar ::-webkit-scrollbar {
     width: 0;
     height: 0;
}

// 解决级联菜单箭头靠右问题
.el-cascader-node__postfix {
    right: 20px;
}


// 解决2.13.0版本select下拉底部最后一项显示不完全问题
.el-select-dropdown__list {
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
}

//解决滚动条被遮挡问题
.el-scrollbar__wrap {
    position: relative;
    z-index: 0;
}

// 解决在el-collapse-item__header中icon下移的问题
.el-collapse-item__header {
    > .icon {
        display: inline-table;
    }
}

// 强制让td内容换行
.el-table tbody td .cell {
    word-break: break-word;
}

// 类型为月的日期组件选中添加边框
.el-month-table td.current:not(.disabled) .cell {
    border: 1px solid #409EFF;
    border-radius: 5px;
}
